<script src="jquery-ui-1.7.2/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="jquery-ui-1.7.2/js/jquery-ui-1.7.2.min.js" type="text/javascript"></script>
<script src="js/ajaxupload.3.6.js" type="text/javascript"></script>
<link href="jquery-ui-1.7.2/css/base/ui.core.css" rel="stylesheet" type="text/css" />
<link href="jquery-ui-1.7.2/css/base/ui.dialog.css" rel="stylesheet" type="text/css" />
<link href="jquery-ui-1.7.2/css/base/ui.theme.css" rel="stylesheet" type="text/css" />
<link href="jquery-ui-1.7.2/css/base/ui.images.css" rel="stylesheet" type="text/css" />

<style type="text/css">
/* BeginOAWidget_Instance_2142022: #dialog */

		#dialog .ui-widget {
			font-family: Arial, Helvetica, sans-serif;
			font-size:12px;
		}
		
		.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited {
			color: #000000;
		}
		
		.ui-widget-header {
			font-size:1em;
			font-weight: bold;
			font-family: Arial, Helvetica, sans-serif;
			background: #cccccc;
			border-color: #666666;
			border-width: 1px;
		}
			
		.ui-dialog-title {
			line-height: 1em;
			color: #000000;
			font-weight: bold;
		}
		
		.ui-widget-content {
			font-size:1em;
			font-weight: bold;
			font-family: Arial, Helvetica, sans-serif;
			background: #eeeeee;
			border-color: #666666;
			border-width: 1px;
		}
		
		/* tab panel bounding box */ 
		.ui-dialog-content {
			font-family: Arial, Helvetica, sans-serif;
			color: #333333;
			font-size:.8em;
			padding: 10px;
		} 
		
		.ui-dialog-buttonpane {
			font-size:.8em;
		}
		
		
/* EndOAWidget_Instance_2142022 */
</style>



<link href="../css/css.css" rel="stylesheet" type="text/css" />



<script language="javascript" type="text/javascript">
function checkAll( n,val ) {
		var f = document.listitem;
		var c ;
		btch = eval( 'f.' + val );
		if(btch.checked==true)
		{
			c=true;
			f.ALLITEM1.checked=true;
			f.ALLITEM2.checked=true;
		}
		else
		{
			c=false;
			f.ALLITEM1.checked=false;
			f.ALLITEM2.checked=false;
		}
		var n2 = 0;
		for (i=1; i <= n; i++) {
			cb = eval( 'f.delitem_' + i );			
			if (cb) {
				cb.checked = c;
				n2++;
			}
		}
		
}
function checkAllItem( n,val ) {
		var f = document.listitem1;
		var c ;
		btch = eval( 'f.' + val );
		if(btch.checked==true)
		{
			c=true;
			f.ALLITEM1.checked=true;
			f.ALLITEM2.checked=true;
		}
		else
		{
			c=false;
			f.ALLITEM1.checked=false;
			f.ALLITEM2.checked=false;
		}
		var n2 = 0;
		for (i=1; i <= n; i++) {
			cb = eval( 'f.delitem_' + i );			
			if (cb) {
				cb.checked = c;
				n2++;
			}
		}
		
}
function deleteselected(n)
	{
		var f = document.listitem1;
		f.del1_id.value="(-1,";
		j=0;
		for (i=1; i <= n; i++) {
			cb = eval( 'f.delitem_' + i );			
			if (cb.checked==true) {
				f.del1_id.value +=cb.value+",";
				j++;
			}
		}
		f.del1_id.value+="-1)";
		if(j>0)
		{
			if (confirm('Ban that su muon xoa '))
			{
				f.action="?page={par_page}&code=17&pid={pid}&pitem={pitem}&p={p}";
				f.submit();
			}
		}
		else
		{
			alert("Bạn cần chọn một {item_name} để xóa");			
		}
	}
	function deleteselectedcat(n)
	{
		var f = document.listitem;
		f.del_id.value="(-1,";
		j=0;
		for (i=1; i <= n; i++) {
			cb = eval( 'f.delitem_' + i );			
			if (cb.checked==true) {
				f.del_id.value +=cb.value+",";
				j++;
			}
		}
		f.del_id.value+="-1)";
		if(j>0)
		{
			if (confirm('Ban that su muon xoa '))
			{
				f.action="{del_item_selected}";
				f.submit();
			}
		}
		else
		{
			alert("Bạn cần chọn một {item_name} để xóa");			
		}
	}
 function ConfirmDeleteCat(id)
 {
 	if(confirm('Bạn có thật sự muốn xóa không ?')){
		document.location='?page={par_page}&pid={pid}&p={p}&code=06&id='+id;
	}
	else	{
		return false;
	}
 }
 function ConfirmDeleteItem(id)
 {
 	if(confirm('Bạn có thật sự muốn xóa không ?')){
		document.location='?page={par_page}&pid={pid}&pitem={pitem}&code=16&id='+id;
	}
	else	{
		return false;
	}
 }
 function SubmitSearch()
 {
 	var f = document.listitem1;
 	f.action="?page={par_page}&code=18";
	f.submit();
 }
 function checkname(frm){
	if(frm.name.value==''){
		alert("Bạn phải nhập vào tên ")	;
		frm.name.focus();
		return false;
	}
}
	
</script>

<style type="text/css">
<!--
.style1 {font-weight: bold}
-->
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="7"><img src="images/bc1.gif" width="7" height="56" /></td>
        <td style="background:url(images/bc2.gif) repeat-x"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="25" align="center" ><strong style="text-transform:uppercase">{title}</strong></td>
          </tr>
          <tr>
            <td width="77%" class="pathpage"><img src="images/home.gif" width="20" height="20" align="absmiddle" />&nbsp;{pathpage}</td>
          </tr>
        </table></td>
        <td width="8"><img src="images/bc3.gif" width="8" height="56" /></td>
      </tr>
      <tr>
        <td style="background:url(images/bc8.gif) repeat-y"></td>
        <td align="left" style="padding-top:5px; padding-bottom:20px"> 
		
		<!--START BLOCK : msg -->
		<div>
		{msg}		</div>
		<!--END BLOCK : msg -->
		<!--START BLOCK : addnew_cat -->
		  <div style="height:10px"></div>
		  <form name="list_item" action="?page={par_page}&pid={pid}&code=02" method="post" onsubmit="return checkname(this)">
          <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:solid #EAEAEA 1px">
            <tr>
              <td colspan="6" style="background:url(images/titlecenter.gif) repeat-x; height:28px; padding-left:5px; border-bottom:solid #D5D5D5 1px; border-top:solid #D5D5D5 1px " class="titlelist">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="84%"><img src="images/01.gif" width="14" height="13" align="absmiddle" />&nbsp;Thêm mới mục </td>
                    <td width="16%">&nbsp;</td>
                  </tr>
                </table></td></tr>
            <tr>
              <td width="20%" align="left" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px; border-right:solid #EBEBEB 1px; padding-left:5px">Tên mục </td>
              <td width="66%" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="text" name="name" style="width:350px; border:solid #cccccc 1px" /></td>
            </tr>
		   <tr>
             <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Thuộc mục</td>
             <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">{parentid}</td>
            </tr>
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Thứ tự </td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="text" name="thu_tu" style="border:solid #cccccc 1px; width:60px; text-align:center" value="{thu_tu}" /></td>
	        </tr>
		   
		   
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Kích hoạt</td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="checkbox" name="active" value="1" checked="checked" /></td>
	        </tr>
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">&nbsp;</td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="submit" name="Submit2" value="Chấp nhận" /><input type="button" name="Submit22" value="Hủy bỏ" onclick="window.location='?page={par_page}&pid={pid}&p={p}&pitem={pitem}'"/></td>
	        </tr>
          </table>
		  </form>
		<!--END BLOCK : addnew_cat -->
		<!--START BLOCK : update_cat -->
		  <div style="height:10px"></div>
		  <form name="list_item" action="?page={par_page}&pid={pid}&code=04&id={id}&p={p}&pitem={pitem}" method="post" onsubmit="return checkname(this)">
          <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:solid #EAEAEA 1px">
            <tr>
              <td colspan="6" style="background:url(images/titlecenter.gif) repeat-x; height:28px; padding-left:5px; border-bottom:solid #D5D5D5 1px; border-top:solid #D5D5D5 1px " class="titlelist">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="84%"><img src="images/01.gif" width="14" height="13" align="absmiddle" />&nbsp;Sửa chữa mục </td>
                    <td width="16%">&nbsp;</td>
                  </tr>
                </table></td></tr>
            <tr>
              <td width="20%" align="left" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px; border-right:solid #EBEBEB 1px; padding-left:5px">Tên mục </td>
              <td width="66%" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="text" name="name" style="width:350px; border:solid #cccccc 1px" value="{name}" /></td>
            </tr>
		   <tr>
             <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Thuộc mục</td>
             <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">{parentid}</td>
            </tr>
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Thứ tự </td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="text" name="thu_tu" style="border:solid #cccccc 1px; width:60px; text-align:center" value="{thu_tu}" /></td>
	        </tr>
		   
		   
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Kích hoạt</td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="checkbox" name="active" value="1" checked="checked" /></td>
	        </tr>
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">&nbsp;</td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="submit" name="Submit2" value="Chấp nhận" /><input type="button" name="Submit22" value="Hủy bỏ" onclick="window.location='?page={par_page}&pid={pid}&p={p}&pitem={pitem}'"/></td>
	        </tr>
          </table>
		  </form>
		<!--END BLOCK : update_cat -->
		<!--START BLOCK : addnew_item --> 
		   <div style="height:10px"></div>
		  <form name="list_item" action="?page={par_page}&code=12&pid={pid}" method="post" enctype="multipart/form-data">
          <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:solid #EAEAEA 1px">
            <tr>
              <td colspan="6" style="background:url(images/titlecenter.gif) repeat-x; height:28px; padding-left:5px; border-bottom:solid #D5D5D5 1px; border-top:solid #D5D5D5 1px " class="titlelist">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="84%"><img src="images/01.gif" width="14" height="13" align="absmiddle" />&nbsp;Thêm mới hình ảnh </td>
                    <td width="16%">&nbsp;</td>
                  </tr>
                </table></td></tr>
            <tr>
              <td width="20%" align="left" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px; border-right:solid #EBEBEB 1px; padding-left:5px">Tiêu đề</td>
              <td width="66%" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="text" name="name" style="width:450px; border:solid #cccccc 1px" /></td>
            </tr>
		   <tr>
             <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Thuộc mục</td>
             <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">{parentid}</td>
            </tr>
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Hình ảnh </td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><span class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">
		       <input type="file" name="image" style="width:250px" />
		     </span></td>
		   </tr>
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Tóm tăt</td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">&nbsp;</td>
		     </tr>
		   <tr>
		     <td colspan="2" align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">{intro}</td>
	        </tr>
		   
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Thứ tự </td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="text" name="thu_tu" style="border:solid #cccccc 1px; width:60px; text-align:center" value="{thu_tu}" /></td>
		     </tr>
		   
		   
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Kích hoạt</td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="checkbox" name="active" value="1" checked="checked" /></td>
		     </tr>
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">&nbsp;</td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="submit" name="Submit2" value="Chấp nhận" /><input type="button" name="Submit22" value="Hủy bỏ" onclick="window.location='?page={par_page}&pid={pid}&pitem={pitem}&p={p}'"/></td>
		     </tr>
          </table>
		  </form>
		<!--END BLOCK : addnew_item -->
		<!--START BLOCK : update_item --> 
		   <div style="height:10px"></div>
		  <form name="list_item" action="?page={par_page}&code=14&pid={pid}&id={id}&p={p}&pitem={pitem}" method="post" enctype="multipart/form-data">
          <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:solid #EAEAEA 1px">
            <tr>
              <td colspan="6" style="background:url(images/titlecenter.gif) repeat-x; height:28px; padding-left:5px; border-bottom:solid #D5D5D5 1px; border-top:solid #D5D5D5 1px " class="titlelist">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="84%"><img src="images/01.gif" width="14" height="13" align="absmiddle" />&nbsp;Sửa chữa </td>
                    <td width="16%">&nbsp;</td>
                  </tr>
                </table></td></tr>
            <tr>
              <td width="20%" align="left" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px; border-right:solid #EBEBEB 1px; padding-left:5px">Tiêu đề </td>
              <td width="66%" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="text" name="name" style="width:450px; border:solid #cccccc 1px"  value="{name}"/></td>
            </tr>
		   <tr>
             <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Thuộc mục</td>
             <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">{parentid}</td>
            </tr>
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Hình ảnh </td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">{image}<input type="file" name="image" style="width:250px" /></td>
	        </tr>
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Tóm tăt</td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">&nbsp;</td>
	        </tr>
		   <tr>
		     <td colspan="2" align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">{intro}</td>
	        </tr>
		   
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Thứ tự </td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="text" name="thu_tu" style="border:solid #cccccc 1px; width:60px; text-align:center" value="{thu_tu}" /></td>
	        </tr>
		   
		   
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">Kích hoạt</td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="checkbox" name="active" value="1" {active} /></td>
	        </tr>
		   <tr>
		     <td align="left" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">&nbsp;</td>
		     <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><input type="submit" name="Submit2" value="Chấp nhận" />
		       <span class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px">
		       <input type="button" name="Submit22" value="Hủy bỏ" onclick="window.location='?page={par_page}&pid={pid}&pitem={pitem}&p={p}'"/>
	         </span></td>
		     </tr>
          </table>
		  </form>
		<!--END BLOCK : update_item -->
		<!--START BLOCK : show_category --> 
		<form name="listitem" action="?page={par_page}&pid={pid}&code=05" method="post">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:solid #EAEAEA 1px">
          <tr>
            <td colspan="6" style="background:url(images/titlecenter.gif) repeat-x; height:28px; padding-left:5px; border-bottom:solid #D5D5D5 1px; border-top:solid #D5D5D5 1px " class="titlelist"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="82%"><img src="images/book.gif" width="18" height="15" />&nbsp;Danh sách {cat_name} </td>
                <td width="18%" class="menuleft"><a href="?page={par_page}&amp;pid={pid}&amp;code=01">Thêm mới {cat_name} </a></td>
              </tr>
            </table></td>
          </tr>
		  
          <tr>
            <td width="3%" align="center" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px; border-right:solid #EBEBEB 1px"><input name="ALLITEM1" type="checkbox" class="active" id="ALLITEM1" value="1" onClick="checkAll({ncat},'ALLITEM1')" />
      <input name="del_id" type="hidden"  /></td>
            <td width="66%" align="left" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><strong>Tên</strong></td>
            <td width="8%" align="center" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px; border-right:solid #EBEBEB 1px"><strong>Thứ tự</strong></td>
            <td width="9%" align="center" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px; border-right:solid #EBEBEB 1px"><strong>Kích hoạt</strong></td>
            <td width="8%" align="center" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px; border-right:solid #EBEBEB 1px">Sửa</td>
            <td width="6%" align="center" valign="middle" bgcolor="#F4F4F4" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px">Xóa</td>
          </tr>
		
		  <!--START BLOCK : list_cat --> 
		   <tr id="{id_category}">
            <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px"><input name="delitem_{i}" type="checkbox" class="active"  value="1" /></td>
            <td align="left" bgcolor="#FAFAFA" class="clrow menuleft" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding-left:5px"><img src="images/book.gif" width="18" height="15" />&nbsp;<a href="{linkcat}"><strong>{name}</strong></a> </td>
            <td align="center" valign="middle" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px; padding:2px"><input type="text" name="thu_tu_{id_category}" style="border:solid #cccccc 1px; width:60px; text-align:center" value="{thu_tu}" /></td>
            <td align="center" valign="middle" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px"><input name="active_{id_category}" type="checkbox" class="style1" value="1" {active} /></td>
            <td align="center" valign="middle" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px;border-right:solid #EBEBEB 1px"><a href="{link_update}"><img src="images/write.gif" name="btnupdate{id_category}" width="15" height="15" border="0" id="btnupdate{id_category}" style="cursor:pointer" title="Sửa mục này"  /></a></td>
            <td align="center" valign="middle" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px"><a href="javascript:ConfirmDeleteCat('{id_category}')" ><img src="images/delete.gif" width="16" height="16" border="0" style="cursor:pointer" title="Xóa mục này"/></a></td>
		   </tr>
		  <!--END BLOCK : list_cat -->
		  
		  
          <tr>
            <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px"><input name="ALLITEM2" type="checkbox" class="active" id="ALLITEM2"  onClick="checkAll({ncat},'ALLITEM2')" value="1"/></td>
            <td align="left" bgcolor="#FAFAFA"  style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px" ><a href="javascript:deleteselectedcat({n})" class="menuleft" style="color:red"><strong>Xóa mục đã chọn</strong></a></td>
            <td colspan="2" align="center" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px"><input type="image" name="imageField" src="images/luu.gif" /></td>
            <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px">&nbsp;</td>
            <td bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px">&nbsp;</td>
          </tr>
		  
          <tr>
            <td colspan="6" align="center" bgcolor="#FAFAFA" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px">{page_cat}</td>
          </tr>
        </table>
		</form>
		<!--END BLOCK : show_category -->
		<!--START BLOCK : show_item -->
        <div style="height:10px"></div>
		<form name="listitem1" action="?page={par_page}&code=15&pid={pid}&pitem={pitem}&p={p}" method="post">
          <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:solid #EAEAEA 1px">
            <tr>
              <td colspan="5" style="background:url(images/titlecenter.gif) repeat-x; height:28px; padding-left:5px; border-bottom:solid #D5D5D5 1px; border-top:solid #D5D5D5 1px " class="titlelist">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="83%"><img src="images/01.gif" width="14" height="13" align="absmiddle" />&nbsp;Danh sách {item_name} </td>
                    <script type="text/javascript">
						$(document).ready(function() {
							$("#dialog").dialog({ 	
									draggable: 'true',
									resizable: 'false',
									autoOpen: false,
									height:450,
									width:600,
									title: 'Upload photo',
									buttons: { 
										"Close": function() { 
											$(this).dialog("close"); 
										}
									} 
							} );
						});
					</script>
					
                    <td width="17%" class="menuleft"><!--<a href="?page={par_page}&code=11&pid={pid}&pitem={pitem}">--><a href="#" onclick="$('#dialog').dialog('open')">Thêm mới {item_name} </a></td>
                  </tr>
                </table></td></tr>
				<tr>
            <td colspan="4" style="height:28px; padding-left:5px; border-bottom:solid #D5D5D5 1px; border-top:solid #D5D5D5 1px " class="titlelist"><table width="100%"  border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td colspan="4"><input type="text" name="keyword" onBlur="if (keyword.value=='') keyword.value='Tên {item_name}...';" onFocus="if (keyword.value=='Tên {item_name}...') keyword.value=''" style="width:250px" value="Tên {item_name}..."> </select> {parentid}<img src="images/icon_timkiem.gif" width="55" height="22" align="absmiddle" onclick="SubmitSearch()" style="cursor:pointer" /><a href="?page={par_page}&amp;pid={pid}&amp;code=01"></a></td>
                </tr>
            </table></td>
          </tr>
            
		  
		   <tr>
		   <!--START BLOCK : list_item -->
            <td align="center" class="clrow menuleft" style="padding:5px" >
			<div class="bordercell" title="- Đăng bới: {user_name} [{username}] - Ngày đăng: {creatdate} "><a href="{link_edit}">{image}</a></div>
			<div><strong>{name}</strong></div>
			<div>Thứ tự&nbsp;<input type="text" name="thu_tu_{id}" style="border:solid #cccccc 1px; width:60px; text-align:center" value="{thu_tu}" /></div>
			<div><input name="active_{id}" type="checkbox" class="style1" value="1"  {active}/>&nbsp;Active<a href="{link_edit}"><img src="images/write.gif" width="15" height="15" border="0" title="Sửa hình ảnh này" />&nbsp;Edit</a>&nbsp;<a href="javascript:ConfirmDeleteItem({id})"><img src="images/delete.gif" width="16" height="16" border="0" />&nbsp;Delete</a></div>			</td>{br}
			 <!--END BLOCK : list_item -->
            </tr>
		  
           <tr>
             <td align="right" colspan="4" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px"><input type="image" name="imageField" src="images/luu.gif" /></td>
           </tr>
           <tr>
            <td align="center" colspan="4" bgcolor="#FAFAFA" class="clrow" style="border-top:solid #EAEAEA 1px; border-bottom:solid #FFFFFF 1px">{pages_items}</td>
            </tr>
          </table>
		  </form>
		<!--END BLOCK : show_item --> 
		
		
        </td>
        <td style="background:url(images/bc4.gif) repeat-y"></td>
      </tr>
      <tr>
        <td><img src="images/bc7.gif" width="7" height="5" /></td>
        <td style="background:url(images/bc6.gif) repeat-x"></td>
        <td><img src="images/bc5.gif" width="8" height="5" /></td>
      </tr>
    </table>
    
    <script type= "text/javascript">/*<![CDATA[*/
$(document).ready(function(){
 
	
	/* example3 */
	new AjaxUpload('#button3', {
		//action: 'upload.php',
		
		action: 'index4.php?page=sr_uploadphoto&id_catab='+$('#parentid').attr('value'), // I disabled uploads in this example for security reaaons
		name: 'myfile', 
		responseType: false,
		
		onComplete : function(file,response){
			$('<li></li>').appendTo($('#uploadmulti .files')).text(file);
		}	
	});		
	
	 
});/*]]>*/</script>
    
    <div id="dialog" title="Dialog Title">
					<ul>
	
	<li id="uploadmulti">
		<p>Chọn file upload</p>		
		<form action="#" method="post">			
			<div>
            	{parentid}
				<input id="button3" type="file" />
			</div>
			<p>Uploaded files:</p>
			<ol class="files"></ol>
            <span id="status"></span>
			<p>
				<input class="submit" type="submit" value="Hoàn tất"/>	
			</p>
		</form>
	</li>
</ul>
</div>